TOC Glossary Forward

Horizontal Lines


In Web-author jargon, a horizontal line across the page is a horizontal rule, and you code for it using the <hr> tag. Web authors frequently use horizontal rules to visually separate topics. To make a rule, just stick <hr> where you want the rule to go. Here's the HTML code for the horizontal rule shown in figure 26.12:

Figure 26.12: A Web browser interprets the <hr> tag by showing a horizontal line.

If you've spent much time hanging out on the Web, you've almost certainly noticed that some Web pages have colorful or whimsical horizontal rules. These horizontal rules are actually inline GIFs. Not only do they liven up Web pages, but they also exist, often free for the taking, in Web-based collections sprinkled all over the globe.

http://www.cs.vu.nl/~dsbouma/rulers.html

http://www.uncg.edu/~rdralph/icons/bars/

The Netscape HTML extended tag set has attributes for the <hr> tag that enable you to modify the appearance of a horizontal rule. Currently, only Netscape can show the modifications, but this may change, especially if these attributes end up in HTML 3.0. As an example of a line you could make, consider the following code:

Figure 26.13 shows what such a horizontal rule would look like in Netscape.

Figure 26.13: This horizontal rule, as interpreted by Netscape, is 20 pixels high, 288 pixels wide, center-aligned, and not shaded.

Briefly, here's how each attribute works:

As another example of how you might use these attributes, figure 26.14 shows a coded <hr> tag:

Figure 26.14: This horizontal rule, as interpreted by Netscape, is 20 pixels high, 75 percent as wide as the page, left-aligned, and shaded.


Tags for an External Graphic


An external graphic would typically be a JPEG image, and you would link to it just as you would link to any other Internet resource (as explained earlier in the section about linking), by using an <a> tag with an href attribute as follows:

Name your JPEG with a .jpg or .jpeg extension. Consider saving your JPEG as a separate, small GIF image and placing the GIF image inline on your Web page. You can then make the GIF link to the JPEG such that people can click the GIF image in order to view the JPEG. You might also display the size of the JPEG so people know what they are getting into before clicking the link. The necessary code might look like:

For example, the Cornell University Division of Rare and Manuscript Collections has an extensive Web site that shows drawings, photographs, and notes made by Louis Agassiz Fuertes while on a trip to Alaska. Most of the links available from the site's home page lead to pages of GIFs, and each GIF acts as a link to a larger, more detailed JPEG.

http://rmc-www.library.cornell.edu/Alaska.Index.html

Note: Graphics that have more than one place that you can click on to go to more than one place on the Web are called ISMAP graphics, and to create one, you must set it up with a Web server. Fun as ISMAPs may be, they are beyond the scope of this chapter.


Sound and Video Links


Just as you can make a link to an external graphic, you can make a link to an external sound or video file, and the syntax is exactly the same. To share a sound or video with the world, you must save it in an appropriate format and name it with the corresponding extension. This section mentions a few utilities that help you work with sounds and movies, and they are all available on the Info-Mac archives and the TidBITS FTP directory:

ftp://ftp.tidbits.com/pub/tidbits/tisk/util/

Two reasonably universal sound formats are Sun au, a somewhat scratchy, 8-bit format, and the less-common MPEG audio, which sounds nicer. To ensure that most of listeners can hear your sounds, I recommend you use one of these formats.

If you work with sounds, you might try Rod Kennedy's freeware SoundMachine, which can record in Sun au format. Name Sun au files with a .au extension; MPEG audio files with .mp2. Web 66 has a nice tutorial about recording sounds for the Web:

http://web66.coled.umn.edu/Cookbook/Sounds/Sounds.html

Movies also have two fairly universal formats, QuickTime and MPEG. If you put a Macintosh QuickTime movie up the Web, you must first flatten it, that is, run it through a program that moves all the data into the data fork (all Mac files have a data fork and a resource fork). A popular utility for flattening movies is Robert Hennessy's freeware flattenMooV. You might also check out Maynard Handley's Sparkle, a freeware program that has some support for converting movies between MPEG and QuickTime formats. QuickTime files need a .mov extension; MPEGs a .mpg or .mpeg extension.


Copying HTML


Given that the future of Web authoring holds lots of changes and new coding possibilities, as you browse the Web, you will almost certainly see pages with formats I didn't explain in this chapter. Luckily, it's considered reasonable practice to look at the code behind a Web page and adapt it to your own content. You can even paste the code directly into your own HTML document. Each browser has a slightly different technique for viewing the code behind the displayed page:

Note: Although copying HTML code and not crediting the source is considered aboveboard, copying graphics, sounds, and movies is a controversial topic. My advice it to freely copy sounds, graphics, or movies from sites where the author openly encourages it, and be sure to read the page carefully to find out whether the author wants credit. Otherwise, ask first.


Web Page Content


When you set up your personal page, unless you have a corporate lawyer looking over your shoulder, I urge you to loosen up, share something about yourself, and have fun. If you are setting up a page for an organization, the page should -- of course -- reflect the tone of the organization. Here are a few specific suggestions:


Testing Tags


After you've written an HTML document and have it stored on your hard disk, test it by opening it in a Web browser. If you HTML document works fine in testing, you can then send it to the organization who will be serving it to everyone on the Internet.

Note: Most of the time, you send files to a Web server by uploading them to a specific directory using an FTP client like Anarchie or Fetch. Make sure to upload the .html files in ASCII mode, and any images or other external files in straight binary mode, not MacBinary mode.

If you use a modem to connect to the Internet, you may not want to be connected while you do the testing. If you launch a Web browser while you are not connected, you'll most likely get an error message, though in most cases you can ignore the error message and view files on your hard disk. Even so, to avoid the error message, you might try:


Troubleshooting Tips


HTML code is usually easy to fix, it's just a matter of staring at it until you figure out the problem. Here are a few tips to speed up the process:

If you use an HTML authoring program that includes a quick-preview for viewing documents in a Web browser, your relative links may not work when you do the preview because the authoring programs tend to create a temporary file and ask the browser to open that, rather than use the actual file you're editing. To avoid the problem, open the file you want to view into your browser without the help of an HTML authoring program. Drag and drop is often the easiest method.

Also, if you are preparing a high-profile page, consider checking it in several browsers on more than one type of computer. Different browsers interpret HTML differently, and browsers differ in their tolerance of minor errors. Also, graphics may display completely differently on different types of computers.


External Approval


If you can't figure out what's wrong with your code or you want a rigorous check, you can submit your code to various forms-based Web pages and they will spit back suggestions for improvement. I prefer Weblint because it gives errors by line and displays HTML code by line.

http://www.unipress.com/web-lint/

http://www.stolaf.edu/misc/html-check/

http://www.vilspa.esa.es/div/help/validation-form.html


Publicizing Your Page


Once your page is up and running, you'll want to spread the word so other people will use it. If your email program lets you set up an automatic signature, you can put your URL in your signature. You can also register your page with many of the Web searching services (such as Yahoo or WebCrawler). If you have links on your page to other related pages, send email to the authors of those pages and ask them to make links back to your page. For additional ways to publicize your pages, check out:

http://www.cen.uiuc.edu/~banister/submit-it/

http://home.mcom.com/escapes/submit_new.html

http://www.uwtc.washington.edu/Computing/WWW/AnnouncingYourSite.html


HTML Converters


If you use an existing word processor, text editor, or desktop publishing program for creating documents that you want to then add HTML code to, you might try an HTML converter that converts your document to a text file and attempts to insert appropriate HTML tags. Particularly if you use a word processor, your word processor may export to either RTF (which stands for Rich Text Format and is also known as Interchange Format) or to XTND (pronounced "extend").


RTF Converters


rtftohtml, written by Chris Hector, converts graphics out of an RTF document into separate PICT images. It also has sophisticated options for text; it has a lot to offer, particularly if you are fairly comfortable with a word processing program and with HTML.

ftp://ftp.cray.com/src/WWWstuff/RTF/rtftohtml_overview.html

rtftohtml doesn't split one document into a series of appropriately connected Web pages, so Christian Bolik wrote rtftoweb, which runs along with rtftohtml. It not only can split out pages based on headings but also can add a table of contents, index, and consistent navigational tools. rtftoweb's Web page says it hasn't yet been tested on the Mac (only on Unix systems), so proceed with care.

ftp://ftp.rrzn.uni-hannover.de/pub/unix-local/misc/rtftoweb/html/rtftoweb.html

Note: In case you were wondering about the URLs for rtftohtml and rtftoweb, the FTP at the start of the URL does mean the pages are being served from FTP servers, but the .html at the end of the URL tells a Web browser to interpret the file as a normal Web page.


XTND Converters


If your word processor can export to XTND, then it can use any HTML XTND converter to save files into HTML format. If you want to try an XTND converter, I recommend HTML + XTND, written by Leonard Rosenthol, a well-known member of the Macintosh online community. I have used it on documents and have been happy with the results. The converter also comes with clip2gif and with a program called XTNDPostProcess, which you use to further improve the conversion. HTML + XTND might be best described as weddingware -- if you like it, send a contribution to Leonard's wedding fund.

ftp://ftp.tidbits.com/pub/tidbits/tisk/html/

Another HTML translation option is the freeware XTND HTML translator by Brian A. Sullivan and Jonathan Ryan Day. The translator works with any XTND-savvy program. But it comes with a template for ClarisWorks, and its Web page includes a link to a tutorial for using the translator with ClarisWorks. The newest version of the translator isn't currently available; Brian and Jonathan are in the process of licensing it to a commercial vendor.

http://ai.eecs.umich.edu/highc/software/translator/XTND_HTML_Translator.html


Programs with HTML Add-ons


When it comes to HTML coding, you can use a word processing program, text editor, page layout program, HTML authoring program, HTML converter, or some combination. If you use a word processing or desktop publishing program, remember to save the file as text before you view it in a Web browser. If you find yourself frequently coding in HTML, you can take advantage of typical word processing features -- glossaries, macros, searching, spell checking, and so on. If you don't think your word processing program is the right tool for the job, you might check out other word processing programs, a text editor, or some of the recent HTML authoring programs.

This section briefly (and alphabetically) lists different word processing programs, text editors, and page layout programs that have add-ons for HTML tagging.


Alpha


Alpha, a $25 shareware program by Peter Keheler, is a text editor primarily used by programmers, and -- although I have a friend who uses Alpha and a set of add-ons for HTML -- if you aren't a programmer or familiar with Alpha, I don't recommend it as your HTML editor of choice. If you want to give it a spin, read the HTML Help file in the Help folder.

ftp://ftp.tidbits.com/pub/tidbits/tisk/util/


BBEdit and BBEdit Lite


BBEdit, a text editor written by Bare-Bones Software, supports extensions, add-ons that enhance what it can do. BBEdit users currently can pick from two different sets of extensions -- BBEdit HTML Extensions, by Carles Bellver, and BBEdit HTML Tools, by Lindsay Davies. At a recent Macintosh user group meeting in Seattle, I picked the brains of a few people who do Web authoring. Several were enthused about BBEdit, and although they said nice things about both sets of extensions, BBEdit HTML Tools currently has the edge among people who use BBEdit for HTML. In particular, people commented favorably on its forms support, flexibility, documentation, and overall interface. Lindsay recently licensed BBEdit HTML Tools to Bare-Bones Software, and I expect BBEdit HTML Tools will be included with BBEdit by the time you read this book.

http://www.uji.es/bbedit-html-extensions.html

http://www.york.ac.uk/~ld11/BBEditTools.html

You can get started with BBEdit using the freeware BBEdit Lite, or you can purchase the commercial version for $69.

ftp://ftp.tidbits.com/pub/tidbits/tisk/util/


FrameMaker


FrameMaker users who want to make documents that print out traditionally and go on the Web might check out WebMaker, a reasonably sophisticated, high-end converter.

http://www.frame.com/

http://www.cern.ch/WebMaker/


Microsoft Word


In Word 4 or 5, use the Glossary and Commands options to automate some HTML tag insertion. In Word 6, you might combine the AutoCorrect, AutoText, Customize, and macro features to speed HTML coding.

http://www.microsoft.com/

If you use Word 6, Dan Berrios's AppleScript-based msw to html converter may prove attractive. It intelligently converts a number of document elements including heading styles, reserved characters, some character formats, bulleted lists, and numbered lists. It also converts tables to the tags that will probably appear in the HTML 3.0 specification. The converter comes with a ten-day evaluation period. After that, to get a functioning copy, you'll need to pay your $15 shareware fee, or $50 for a site license.

http://dreyer.ucsf.edu/mswtohtml.html

You might also check out NICE Technologies's Web site, where the company offers a demo version of WebWizard, a $79 Word 6 add-on that looks promising.

http://www.webcom.com/~nicetech/webware/webwiz.html

Microsoft does have a Web authoring tool, called Word Assistant, for Microsoft Word for Windows, but I'm not holding my breath waiting for a Macintosh version.


Nisus Writer


Nisus Writer is currently my favorite HTML authoring option, thanks to Sandra Silcot, who wrote an excellent set of macros that work with Nisus Writer to tag text with HTML codes. The macros are freeware for personal, non-profit, or educational use.

http://www.unimelb.edu.au/~ssilcot/SilcotsHTMLMacrosReadMe.html

Combine these macros with Nisus's sophisticated searching (it can even replace through multiple documents at once), non-contiguous selection, and Ignore Spelling character style, and you have an excellent HTML authoring tool. Nisus Writer even saves files with all the formatting in the resource fork, so you don't have to save files as text for a Web browser to load them.

http://www.nisus-soft.com/~nisus/index.html


PageMaker


Rumor has it that Adobe will soon ship an HTML utility for PageMaker, but if you are looking for a third-party solution, you might try Dave, an AppleScript by Jeff Boulter, that helps with converting PageMaker articles into HTML. According to Jeff, Dave is highly customizable, but only works on 32K or smaller articles.

http://www.bucknell.edu/bucknellian/dave/

You might also check out Mitch Cohen's WebSucker utility.

http://www.iii.net/users/mcohen/websucker.html


QuarkXPress


Astrobyte's BeyondPress lets you map document elements to HTML elements such as headings and blockquotes. You also can map styles to HTML tags, create links, and convert images to GIF or JPEG format. Unlike most of the tools mentioned in this chapter, with a $595 per copy price, BeyondPress isn't for low-budget crowd.

http://www.astrobyte.com/

You can find a few less commercial possibilities on the Internet, including Quark to HTML by Jeremy Hylton and HTML Xport by Eric Knudstrip.

http://the-tech.mit.edu/~jeremy/qt2www.html

ftp://mars.aliens.com/pub/Macintosh/HTML_Xport.sit


Storyspace


Eastgate Systems' $245 Storyspace almost belongs in the HTML Authoring Programs section of this chapter, but I included it here because it was a functional program before the Web was but a glitter in a few people's eyes. Storyspace enables you to create hypertexts, and it is often used in academic and literary contexts. It can also export to HTML and might be especially useful for creating Web sites that have many pages with complex linkages.

http://www.eastgate.com/~eastgate/


HTML Authoring Programs


The current state of HTML authoring programs leaves much to be desired for people interested in creating and managing multiple-page Web sites. Many programs don't include necessary features and others are still in beta, making potentially useful features too slow or quirky for serious authoring. Even so, several of these programs have a great deal to offer to anyone wanting to make a few Web pages without memorizing lots of tags and attributes. In the next year, I expect to see an explosion of Web authoring tools and an increase in the quality of the tools. For now, here is an alphabetical list of the most promising or well-known of the available programs, with notes about what you can expect from them. Most of the freeware and shareware is available from the Info-Mac archives and from the FTP directory for the Internet Starter Kit. If you can't find a program in the FTP URL below, try the program's home page.

ftp://ftp.tidbits.com/pub/tidbits/tisk/html/


Web Resources


The Internet is loaded with Web resources, and almost everything I know about the Web came from reading Web pages and participating in mailing lists. If you want to go further with the Web than just making a simple home page, I strongly recommend these resources, which I have found to be up-to-date and helpful.

The first resource is a family of four mailing lists about the Macintosh and the Internet. Two of the lists discuss Web-related topics:

The home page for the lists explains how to sign up and acts a jumping off point for exploration of other Web-based resources:

http://abs.apple.com/apple-internet/

If your Web interests concern more than the Macintosh, you might try the HTML Authoring Mailing List, which discusses issues related to HTML coding and Web serving, on most any platform you can imagine. If you ask a question, be sure to indicate for what operating system you want the answer. To subscribe, send email to listserv@netcentral.net, and put the following command in the body of your message: SUBSCRIBE html-list your name. Put your real name in the message.

For help setting up MacHTTP as a Web server and for writing CGI scripts to run forms, I cannot say nice enough things about Jon Wiederspan's online tutorial.

http://www.uwtc.washington.edu/Computing/WWW/CreatingASite.html


HTML for Fun and Profit


Well, I hope that this chapter has given you the information you need to start authoring your own Web pages. As much as the programs that hide the HTML from you are starting to appear, I do recommend that you spend some time learning how HTML works. It's a surprisingly flexible language, and when HTML 3.0 is finalized, it will become all the more flexible. The programs that handle HTML behind the scenes will become even more necessary then, but at the same time, if they make mistakes or don't include all the tagging options that you want, you'll need to know how to correct the mistakes or modify the codes manually.

This ends our journey into the world of HTML. The next chapter "Utilities and Miscellany," covers a veritable menagerie of miscellaneous MacTCP programs.


TOC Glossary Forward